package dahua_design.model1_02;

import dahua_design.model1_02.Oper.*;

/**
 * @ClassName: OperationFactory
 * @Description:
 * @Version: v1.0.0
 * @Author: tamir
 * @Date: 2022/05/30
 * Modification History:
 * Date             Author      Version     Description
 * -------------------------------------------------------------
 * 2022/05/30      tamir        v1.0.0      创建
 */
public class SimpleOperationFactory {
	public Operation getOperation(String op){
		
		switch (op){
			case "+":
				return new AddOperation();
			case "-":
				return new SubOperation();
			case "*":
				return new MulOperation();
			default:
				return new DivOperation();
		}
	}
}
